<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "merchant_category_relation".
 *
 * @property int $merchant_id 商户ID,取merchant
 * @property int $cat_id 分类ID,取merchant_category
 *
 * @property Merchant $merchant
 */
class MerchantCategoryRelation extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'merchant_category_relation';
    }

    /**
     * Gets query for [[Merchant]].
     *
     * @return \yii\db\ActiveQuery
     */
    public function getMerchant()
    {
        return $this->hasOne(Merchant::className(), ['merchant_id' => 'merchant_id']);
    }
}
